package com.example.administrator.runbook.fragments.community.view;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.LinearLayout;

import com.example.administrator.runbook.R;

/**
 * Created by Administrator on 2016/11/8.
 */

public class ImageText extends LinearLayout {

    private Paint paint;
    private Drawable drawable;
    private String text;

    public ImageText(Context context) {
        super(context);
    }

    public ImageText(Context context, AttributeSet attrs) {
        super(context, attrs);
        paint = new Paint(Paint.ANTI_ALIAS_FLAG);
        if (attrs != null) {
            TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.ImageText);
            drawable = array.getDrawable(R.styleable.ImageText_src);
            text = array.getString(R.styleable.ImageText_text);
            array.recycle();
        }
        paint.setColor(getResources().getColor(R.color.text_gray));
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);

    }
}
